// verify_deps.js - 验证依赖是否正确安装
console.log("验证依赖包是否正确安装...");

try {
    // 测试 @langchain/community
    const communityPkg = require('@langchain/community/package.json');
    console.log(`✓ @langchain/community: ${communityPkg.version}`);
} catch (error) {
    console.error("✗ @langchain/community 无法加载:", error.message);
}

try {
    // 测试 hnswlib-node
    const hnswlibPkg = require('hnswlib-node/package.json');
    console.log(`✓ hnswlib-node: ${hnswlibPkg.version}`);
} catch (error) {
    console.error("✗ hnswlib-node 无法加载:", error.message);
}

try {
    // 测试 @langchain/deepseek
    const deepseekPkg = require('@langchain/deepseek/package.json');
    console.log(`✓ @langchain/deepseek: ${deepseekPkg.version}`);
} catch (error) {
    console.error("✗ @langchain/deepseek 无法加载:", error.message);
}

try {
    // 测试 langchain/text_splitter
    const textSplitterPkg = require('langchain/text_splitter');
    console.log("✓ langchain/text_splitter: 可用");
} catch (error) {
    console.error("✗ langchain/text_splitter 无法加载:", error.message);
}

console.log("依赖验证完成。");